package com.elephant.framework.dynamicdatasource.controller;


import com.elephant.framework.dynamicdatasource.entity.User;
import com.elephant.framework.dynamicdatasource.service.impl.UserServiceImpl;
import com.framework.boc.response.CommonResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import com.framework.boc.controller.BaseController;

import java.util.List;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author Leil
 * @since 2020-11-17
 */
@RestController
@RequestMapping("/dynamicdatasource/user")
public class UserController extends BaseController {

    @Autowired
    UserServiceImpl userService;

    @GetMapping("/list")
    public CommonResponse list() {
        List<User> list = this.userService.list();
        return CommonResponse.success(list);
    }

}

